﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SAM.Framework.Configuration;

namespace SAM.Configuration.Service
{
    public class DefaultReadConfigurationService:IRead,IWriter
    {
        private Domain.ConfigurationAggregateRoot aggragteRoot = new Domain.ConfigurationAggregateRoot();
       
        public T Read<T>(FileType fileType)
        {
            return this.aggragteRoot.Read<T>(fileType);
        }

        public T Read<T>(string fileName, FileType fileType)
        {
            return this.aggragteRoot.Read<T>(fileName, fileType);   
        }

        public void Writer<T>(FileType fileType, T data)
        {
            this.aggragteRoot.Writer<T>(fileType, data);
        }

        public void Writer<T>(string fileName, FileType fileType, T data)
        {
            this.aggragteRoot.Writer<T>(fileName, fileType, data);
        }
    }
}
